﻿@{
    ViewBag.Title = "DocPicList";
    Layout = "~/Views/Shared/_Layout.cshtml";
    string docClsName = ViewData["docClsName"] == null ? "最新信息" : ViewData["docClsName"].ToString();
    string navi = ViewData["navi"] == null ? "当前位置：首页 > 最新信息" : ViewData["navi"].ToString();
}
@using ElingOA6_DSJCJ.Models;
@using Webdiyer.WebControls.Mvc
@model PagedList<ElingOA6_DSJCJ.Models.DocumentGridModel>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>@ElingOA6_DSJCJ.Common.GlobalConstant.CONSTRING_SYSTITLE</title>
    @if (false)
    {
        <script src="@Url.Content("/Scripts/jquery-vsdoc.js")" type="text/javascript"></script>
        <script src="@Url.Content("/Scripts/ASPxScriptIntelliSense.js")" type="text/javascript"></script>
    }
    <script type="text/javascript">
        $(function () {
            var mode = $('#hdMode').val();
            if (mode == "p") {
                $('#tagContent0').css('display', 'none');
                $('#tagContent1').css('display', 'block');
                $('#tagList').removeClass('selectTag');
                $('#tagPic').addClass('selectTag');
            }
            else if (mode == "l") {
                $('#tagContent0').css('display', 'block');
                $('#tagContent1').css('display', 'none');
                $('#tagList').addClass('selectTag');
                $('#tagPic').removeClass('selectTag');
            }
        });

        function selectTag(showContent, selfObj) {
            var keyName = $('#hdKeyName').val();
            var keyClass = $('#hdKeyClass').val();
            if (showContent == "tagContent0") {
                this.location.href = "/Index/DocPicList?keyName=" + keyName + "&&keyClass=" + keyClass + "&&mode=l";
            }
            else if (showContent == "tagContent1") {
                this.location.href = "/Index/DocPicList?keyName=" + keyName + "&&keyClass=" + keyClass + "&&mode=p";
            }


        }
    </script>
</head>
<body>
    <div class="list_content" style="width: 1000px;">
        <div class="lc_t">
            <h3>
                图片新闻</h3>
            <span>当前位置：<a href="#">首页</a> &gt; <a href="#">图片新闻</a></span></div>
        <div class="paging-content">
            <ul>
                @foreach (DocumentGridModel documentModel in Model as List<DocumentGridModel>)
                { 
                    <li><span><a href="/Index/DocView?docId=@documentModel.FDocId">
                        <img src="@documentModel.FThumbSrvFileName"></a></span><span class="cn"><a href="/Index/DocView?docId=@documentModel.FDocId">@documentModel.FTitle</a></span></li>
                }
            </ul>
        </div>
        <div class="manu">
            <table width="100%" cellspacing="0" cellpadding="0" height="35">
                <tr>
                    <td>
                        <span style="float: left; width: 50%;">共 @Model.TotalItemCount 条记录，页 @Model.CurrentPageIndex/@Model.TotalPageCount</span>
                        @Html.Pager(Model, new PagerOptions { ContainerTagName = "span", PageIndexParameterName = "id", AlwaysShowFirstLastPageNumber = true, HorizontalAlign = "right", FirstPageText = "首页", LastPageText = "末页" }, new { style = "" })
                    </td>
                </tr>
            </table>
        </div>
    </div>
    @*<div class="main2">
    <div class="paging-title"><span>@navi</span><h3>@docClsName</h3></div>
    <DIV id="con">
        <UL id="tags">
            <LI id="tagList">
                <span><img src="@Url.Content("~/Content/images/list.png")"></span>
                <A onclick="selectTag('tagContent0',this)" href="javascript:void(0)">列表</A> 
            </LI>
            <LI class="selectTag" id="tagPic">
                <span><img src="@Url.Content("~/Content/images/photo.png")"></span>
                <A onclick="selectTag('tagContent1',this)" href="javascript:void(0)">图片</A> 
            </LI>
        </UL>
        <DIV id="tagContent">
            <DIV class="tagContent" id="tagContent0">
    	        <div class="paging-content5">
        	        <ul>
                        @foreach (DocumentGridModel documentModel in Model as List<DocumentGridModel>)
                        {
                            <li><a href="/Index/DocView?docId=@documentModel.FDocId" target="_blank">@documentModel.FTitle</a></li>
                        }
                        <div class="clear"></div>
                    </ul>
                    <table width="100%" cellspacing="0" cellpadding="0" height="35">
                        <tr>
                            <td>
                                <span style="float: left; width: 50%;">共 @Model.TotalItemCount 条记录，页 @Model.CurrentPageIndex/@Model.TotalPageCount</span>
                                @Html.Pager(Model, new PagerOptions { ContainerTagName = "span", PageIndexParameterName = "id", AlwaysShowFirstLastPageNumber = true, HorizontalAlign = "right", FirstPageText = "首页", LastPageText = "末页" }, new { style = "" })
                            </td>
                        </tr>
                    </table>
                </div>
            </DIV>
            <DIV class="tagContent selectTag" id="tagContent1">
    	        <div class="paging-content">
            	    <ul>
                        @foreach (DocumentGridModel documentModel in Model as List<DocumentGridModel>)
                        {
                            <li>
                                <span>
                                    <a href="/Index/DocView?docId=@documentModel.FDocId" target="_blank">
                                    <img src="@documentModel.FThumbSrvFileName">
                                    </a>
                                </span>
                                <span class="cn">
                                    <a href="#">@documentModel.FTitle</a>
                                </span>
                            </li>
                        }
                        <div class="clear"></div>
                    </ul>
                    <table width="100%" cellspacing="0" cellpadding="0" height="35">
                        <tr>
                            <td>
                                <span style="float: left; width: 50%;">共 @Model.TotalItemCount 条记录，页 @Model.CurrentPageIndex/@Model.TotalPageCount</span>
                                @Html.Pager(Model, new PagerOptions { ContainerTagName = "span", PageIndexParameterName = "id", AlwaysShowFirstLastPageNumber = true, HorizontalAlign = "right", FirstPageText = "首页", LastPageText = "末页" }, new { style = "" })
                            </td>
                        </tr>
                    </table>
                </div>
            </DIV>
        </DIV>
    </DIV>
</div>*@
    @Html.Hidden("hdMode", ViewData["mode"])
    @Html.Hidden("hdKeyName", ViewData["keyName"])
    @Html.Hidden("hdKeyClass", ViewData["keyClass"])
</body>
</html>
